from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client


secret_id = 'AKIDXy931i8krwoOkpOGelbARTD5gNUKmFo6'      # 替换为用户的 secretId
secret_key = 'FI5d0b0D9pIVRAe4aaLwIODl26tUpDLE'      # 替换为用户的 secretKey
region = 'ap-nanjing'     # 替换为用户的 Region
# token = None                # 使用临时密钥需要传入 Token，默认为空，可不填
# scheme = 'https'            # 指定使用 http/https 协议来访问 COS，默认为 https，可不填
config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key)
# 2. 获取客户端对象
client = CosS3Client(config)
objects = {
   "Quiet": "true",
   "Object": [
      {
         "Key": "a.png"
      },
      {
         "Key": "b.png"
      }
   ]
}
client.delete_objects(
   Bucket='cccc-1301605533',
   Delete=objects
)
